{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[98  9]\n",
      " [18 29]]\n",
      "              precision    recall  f1-score   support\n",
      "\n",
      "           0       0.84      0.92      0.88       107\n",
      "           1       0.76      0.62      0.68        47\n",
      "\n",
      "    accuracy                           0.82       154\n",
      "   macro avg       0.80      0.77      0.78       154\n",
      "weighted avg       0.82      0.82      0.82       154\n",
      "\n",
      "Accuracy: 82.47%\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGwCAYAAABVdURTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4iUlEQVR4nO3de1zUVf7H8feAcikFNQTURtHKrLyVJqGVWZRlS9q6q1nrrbLNtFzJNiyFVlPMLN3SdLU0bSvtYv5arxlqZZGWitvFS14Qt4S0UgQVZOb8/ujh7E6CzhdnGPn6ej4e83g4Z873O585WfPufM98j8MYYwQAAGATIcEuAAAAwJ8INwAAwFYINwAAwFYINwAAwFYINwAAwFYINwAAwFYINwAAwFZqBLuAquZ2u/XDDz+odu3acjgcwS4HAAD4wBijw4cPq2HDhgoJOfXczDkXbn744Qc5nc5glwEAACph7969uvDCC0/Z55wLN7Vr15b06+BERUUFuRoAAOCLwsJCOZ1Oz/f4qZxz4ebEpaioqCjCDQAA1YwvS0pYUAwAAGyFcAMAAGyFcAMAAGyFcAMAAGyFcAMAAGyFcAMAAGyFcAMAAGyFcAMAAGyFcAMAAGzlnLtDcaB8//NR3fbCRyoucen88FAte6SzGtWLDHZZAABUmcXr9mroe//2PJ96Z2v9LrHq93MM6szNxx9/rJSUFDVs2FAOh0OLFi067TFr1qzRVVddpfDwcF188cV69dVXA17n6TR/cqk6TVylwmMuuYxUeMylThNXqf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AACwt6DO3ISFhaldu3bKysrytLndbmVlZSkpKanC4yZOnKixY8dq+fLlat++fVWUCgAAqomgztxIUmpqqvr376/27durQ4cOmjJlioqLizVw4EBJUr9+/dSoUSNlZmZKkp555hmlp6frjTfeUEJCgmdtTq1atVSrVq2gfQ4AAHB2CHq46d27t/bv36/09HTl5+erbdu2Wr58uWeRcV5enkJC/jvBNH36dJWWluoPf/iD13kyMjL01FNPVWXpAADgLBT0+9xUNe5zAwBA9VNt7nMDAADgb4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgK4QbAABgKzWCXYBddH96iTYX/fd5m1rS/426PXgFAQBQxdbv+Fm9Xs72PH/r/iR1uLhelddxVszcTJs2TQkJCYqIiFBiYqLWr19/yv5vv/22WrRooYiICLVq1UpLly6tokrLl5DmHWwkaXPRr+0AAJwLEtKWeAUbSer1cnZQvguDHm4WLFig1NRUZWRkaOPGjWrTpo26du2qH3/8sdz+n332mfr06aP77rtPmzZtUo8ePdSjRw99/fXXVVz5r073D42AAwCwu7Ptu9BhjDFV+o6/kZiYqKuvvlpTp06VJLndbjmdTj388MNKS0s7qX/v3r1VXFysxYsXe9quueYatW3bVjNmzDjt+xUWFio6OlqHDh1SVFTUGdX+20tRFeESFQDArn57KaoiZ3qJysr3d1BnbkpLS7VhwwYlJyd72kJCQpScnKzs7PIHK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xczZs3578dPrA6zlOmTNGll16qyMhIOZ1ODR8+XMeOHauiaqunjz/+WCkpKWrYsKEcDocWLVp02mPWrFmjq666SuHh4br44ov16quvBrxOGfhs/vz5JiwszMyePdt88803ZtCgQaZOnTqmoKCg3P6ffvqpCQ0NNRMnTjTffvutGTVqlKlZs6b56quvqrjy6sXqON99991m2rRpZtOmTWbLli1mwIABJjo62vznP/+p4sqrF6vjfMLu3btNo0aNzHXXXWe6d+9eNcVWY1bHuaSkxLRv395069bNrF271uzevdusWbPG5OTkVHHl1YvVcX799ddNeHi4ef31183u3bvNihUrTIMGDczw4cOruPLqZenSpebJJ580CxcuNJLMe++9d8r+u3btMuedd55JTU013377rXnxxRdNaGioWb58eUDrJNxY0KFDBzNkyBDPc5fLZRo2bGgyMzPL7d+rVy9z++23e7UlJiaaP//5zwGts7qzOs6/VVZWZmrXrm3mzp0bqBJtoTLjXFZWZjp27Ghefvll079/f8KND6yO8/Tp002zZs1MaWlpVZVoC1bHeciQIebGG2/0aktNTTWdOnUKaJ124ku4+etf/2quuOIKr7bevXubrl27BrAyY7gs5aPS0lJt2LBBycnJnraQkBAlJycrOzu73GOys7O9+ktS165dK+yPyo3zbx05ckTHjx9XvXr1AlVmtVfZcR4zZoxiY2N13333VUWZ1V5lxvn9999XUlKShgwZori4OLVs2VLjx4+Xy+WqqrKrncqMc8eOHbVhwwbPpatdu3Zp6dKl6tatW5XUfK4I1vfgObdxZmUdOHBALpdLcXFxXu1xcXHaunVrucfk5+eX2z8/Pz9gdVZ3lRnn33r88cfVsGHDk/6Fwn9VZpzXrl2rV155RTk5OVVQoT1UZpx37dqlVatW6Z577tHSpUu1Y8cOPfTQQzp+/LgyMjKqouxqpzLjfPfdd+vAgQO69tprZYxRWVmZHnzwQT3xxBNVUfI5o6LvwcLCQh09elSRkZEBeV9mbmArEyZM0Pz58/Xee+8pIiIi2OXYxuHDh9W3b1/NmjVLMTExwS7H1txut2JjYzVz5ky1a9dOvXv31pNPPqkZM2YEuzRbW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CuEGwAAYCuEGwAAYCuEGwABl5ubK4fDoZycHJ+PGTBggHr06BGwmgDYF+EGqGYcDscpH0899VSV1XLDDTd43jc8PFyNGjVSSkqKFi5c6NXP6XRq3759atmyZZXVJklr1qyRw+HQwYMHA/o++/fv1+DBg9W4cWOFh4crPj5eXbt21aeffurp43A4tGjRIsvnTkhI0JQpU/xXLHAOqBHsAgBYs2/fPs+fFyxYoPT0dG3bts3TVqtWLc+fjTFyuVyqUSNw/6oPGjRIY8aMUVlZmf7zn//ovffe01133aUBAwZo5syZkn7dbTk+Pj5gNQRbz549VVpaqrlz56pZs2YqKChQVlaWfvrpp2CXBpybAr57FYCAmTNnjomOjvY8P7Gp3dKlS81VV11latasaVavXl3uJpfDhg3z2uDO5XKZ8ePHm4SEBBMREWFat25t3n777VO+f+fOnc2wYcNOap89e7aRZFauXGmMMWb37t1Gktm0aZMxxpiysjJz7733et6refPmZsqUKV7nOFHzU089ZWJiYkzt2rXNn//8Z1NSUuJTzSfeU+Vs7ne6z/rzzz+bu+++28TExJiIiAhz8cUXm9mzZ5c7Br/88ouRZNasWVPhOP12c9cmTZoYY4zZsWOHueOOO0xsbKw5//zzTfv27T1jdmJ8f/sZjPl1R+s2bdp4vcfkyZM95zXm178LV199tTnvvPNMdHS06dixo8nNza2wRsBOmLkBbCgtLU2TJk1Ss2bNVLduXZ+OyczM1D//+U/NmDFDl1xyiT7++GP96U9/Uv369dW5c2dL79+/f389+uijWrhwoZKTk0963e1268ILL9Tbb7+tCy64QJ999pkeeOABNWjQQL169fL0y8rKUkREhNasWaPc3FwNHDhQF1xwgcaNG3famq+99lq9++676tmzp7Zt26aoqChFRkb69FlHjx6tb7/9VsuWLVNMTIx27Niho0ePlvtZa9WqpVq1amnRokW65pprFB4eflKfL774QrGxsZozZ45uvfVWhYaGSpKKiorUrVs3jRs3TuHh4Zo3b55SUlK0bds2NW7cWAsXLlSbNm30wAMPaNCgQT6Pf1lZmXr06KFBgwbpzTffVGlpqdavXy+Hw+HzOYBqLdjpCkDlVTRzs2jRIq9+p5u5OXbsmDnvvPPMZ5995tXnvvvuM3369Knw/SuauTHGmMTERHPbbbcZY06euSnPkCFDTM+ePb1qrlevnikuLva0TZ8+3dSqVcu4XC6faj4xHr/88ovndV+OS0lJMQMHDqyw1t965513TN26dU1ERITp2LGjGTlypNm8ebNXH0nmvffeO+25rrjiCvPiiy96njdp0sRMnjzZq8/pZm5++umn084mAXbGzA1gQ+3bt7fUf8eOHTpy5Ihuvvlmr/bS0lJdeeWVlarBGHPKmYJp06Zp9uzZysvL09GjR1VaWqq2bdt69WnTpo3OO+88z/OkpCQVFRVp7969KioqqlTNvnzWwYMHq2fPntq4caNuueUW9ejRQx07dqzwnD179tTtt9+uTz75RJ9//rmWLVumiRMn6uWXX9aAAQMqPK6oqEhPPfWUlixZon379qmsrExHjx5VXl5ehcf4ol69ehowYIC6du2qm2++WcnJyerVq5caNGhwRucFqgvCDWBD559/vtfzkJAQGWO82o4fP+75c1FRkSRpyZIlatSokVe/8i6znI7L5dJ3332nq6++utzX58+frxEjRui5555TUlKSateurWeffVbr1q3z+T0qW7Mvx912223as2ePli5dqpUrV+qmm27SkCFDNGnSpArPGxERoZtvvlk333yzRo8erfvvv18ZGRmnDDcjRozQypUrNWnSJF188cWKjIzUH/7wB5WWlp7ys5/un6ckzZkzR4888oiWL1+uBQsWaNSoUVq5cqWuueaaU54bsAPCDXAOqF+/vr7++muvtpycHNWsWVOSdPnllys8PFx5eXmW19eUZ+7cufrll1/Us2fPcl//9NNP1bFjRz300EOetp07d57Ub/PmzTp69Khnrcznn3+uWrVqyel0ql69eqetOSwsTNKvYesEXz9r/fr11b9/f/Xv31/XXXedHnvssVOGm9+6/PLLvX76XbNmTa86pF/HYcCAAbrzzjsl/Rq8cnNzT/oMvz2ufv36ys/P95odK+8eQldeeaWuvPJKjRw5UklJSXrjjTcINzgnEG6Ac8CNN96oZ599VvPmzVNSUpL++c9/6uuvv/Zchqldu7ZGjBih4cOHy+1269prr9WhQ4f06aefKioqSv3796/w3EeOHFF+fr7XT8EnT56swYMHq0uXLuUec8kll2jevHlasWKFmjZtqtdee01ffPGFmjZt6tWvtLRU9913n0aNGqXc3FxlZGRo6NChCgkJ8anmJk2ayOFwaPHixerWrZsiIyN9Oi49PV3t2rXTFVdcoZKSEi1evFiXXXZZuZ/lp59+0h//+Efde++9at26tWrXrq0vv/xSEydOVPfu3T39EhISlJWVpU6dOik8PFx169bVJZdcooULFyolJUUOh0OjR4+W2+32On9CQoI+/vhj3XXXXQoPD1dMTIxuuOEG7d+/XxMnTtQf/vAHLV++XMuWLVNUVJQkaffu3Zo5c6buuOMONWzYUNu2bdN3332nfv36nf4vC2AHwV3yA+BMVLSg+H8X0J6Qnp5u4uLiTHR0tBk+fLgZOnSo10/B3W63mTJlirn00ktNzZo1Tf369U3Xrl3NRx99VOH7/+9PlcPCwkyDBg3M7373O7Nw4UKvfr9dUHzs2DEzYMAAEx0dberUqWMGDx5s0tLSvBbJnlgEnZ6ebi644AJTq1YtM2jQIHPs2DFLNY8ZM8bEx8cbh8Ph+Sn46Y4bO3asueyyy0xkZKSpV6+e6d69u9m1a1e5Y3Ds2DGTlpZmrrrqKhMdHW3OO+88c+mll5pRo0aZI0eOePq9//775uKLLzY1atTwLPzdvXu36dKli4mMjDROp9NMnTr1pEXa2dnZpnXr1iY8PNz873+yp0+fbpxOpzn//PNNv379zLhx4zznzc/PNz169DANGjQwYWFhpkmTJiY9Pd24XK4K/1kCduIw5jcXbgEAAKoxtl8AAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC2QrgBAAC28v9zcMFxYR43+AAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# import necessary libraries\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.svm import SVC\n",
    "from sklearn.metrics import classification_report, confusion_matrix\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# load and preprocess the data\n",
    "data = pd.read_csv('diabetes.csv')\n",
    "X = data.drop('Outcome', axis=1)\n",
    "y = data['Outcome']\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n",
    "#normalize data\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "sc = StandardScaler()\n",
    "X_train = sc.fit_transform(X_train)\n",
    "X_test = sc.transform(X_test)\n",
    "\n",
    "# define the SVM model\n",
    "svm = SVC(kernel='linear', C=1, random_state=0)\n",
    "\n",
    "# train the model\n",
    "svm.fit(X_train, y_train)\n",
    "\n",
    "# test the model\n",
    "y_pred = svm.predict(X_test)\n",
    "\n",
    "# print the results\n",
    "print(confusion_matrix(y_test,y_pred))\n",
    "print(classification_report(y_test,y_pred))\n",
    "from sklearn.metrics import accuracy_score\n",
    "accuracy = accuracy_score(y_test, y_pred)\n",
    "print(\"Accuracy: {:.2f}%\".format(accuracy*100))\n",
    "\n",
    "\n",
    "# visualize the results\n",
    "plt.scatter(y_test, y_pred)\n",
    "plt.xlabel('True Diabetes Status')\n",
    "plt.ylabel('Predicted Diabetes Status')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.2"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
